/****************************************************************
 * I am the AC 130 vs Pirate game. I allow the user to control an 
 * AC130 gunship in the hunt for Modern day pirates. The player  
 * will be allowed to roam free across a section of ocean/coastline.  
 * In the water there will be four types of vessels: Merchant  
 * ships that the player must protect, Pirate ships that the player  
 * must identify and destroy, Fishing boats that look like Pirate  
 * ships that the player must not destroy, and Friendly Navy ships  
 * that can capture pirates for extra points. Time permitting there  
 * may also be ground targets to attack. 
 *
 * Key elements of this project will be the Player/AC130, the Ships,  
 * the ShipAI system, the collision grid, the debris controller, the  
 * Ground/Water, Clouds, and scoring system. This project will make  
 * use of an external text file to store useful game parameters,  
 * thus allowing us to play balance the game without recompiling  
 * the executable. 
 *****************************************************************
 * I am the Building class. I contain all the information to render
 * and maintain a single building in the world. I am called a 
 * building, but I realy represent any Static, non waypoint object 
 * in the world. This includes, trees, roads, docks, ect. I can be
 * rendered at an angle to give a more dynamic look to the game.
 *****************************************************************/

#include "Building.h"


/// I am the constructor I set the default values for this building
Building::Building(){
	center = new Point;
	type = 0;
	loyalty = 0;
	angle = 0;
	radius = 0.5;
	hitPoints = 10; 
}

/// I am the destructor. I clean up the objects created in the 
/// constructor
Building::~Building(){
	delete center;
}

/// I am the setter fuction. I initilze the building to its place
/// in the world. I also take in type information like hitpoints, radius,
/// bitmap pointers
void Building::SetBldg(Point * newCtr, int type, float newAng, float newRad, 
			BITMAP * newAlive, BITMAP* newDead, int newHp, int newLoyalty)
{
	this->center = newCtr;
	this->type = type;
	this->angle = newAng;
	this->radius = newRad;
	
	//loading temporary building bitmaps
	this->imgAlive = load_bitmap("Data\\Building\\buildingAlive.bmp" ,NULL);
	this->imgDead = load_bitmap("Data\\Building\\buildingDead.bmp" ,NULL);

}


/// I am the Get Hit by Bullet Function. I check to see if
/// a bullet has hit this building, and subtract the dammage from it.
void Building::GetHit(Bullet * bullet){

}

/// I am the update function. in the event that buildings need to be
/// animated I will update their interal values. For now I do nothing.
void Building::Update(){

}


/// I am the draw funciton. I render this building into the world
/// If the building is outside the screen I render nothing. Depending
/// on the hitpoints I render either the alive or dead image.
void Building::Draw(Camera * cam){

}